SPA_RESOLVE_INIT = function(transition) {
    var html = '<div class="infoList">\n' +
        '<table class="info-tables-l mb-30">\n' +
        '<tbody>\n' +
        '<tr><td>账号</td><td id="uname"></td></tr>\n' +
        '<tr><td>昵称</td><td id="nickname_info"></td></tr>\n' +
        '<tr><td>邮箱</td><td id="emails"></td></tr>\n' +
        '<tr><td>电话</td><td id="telephone"></td></tr>\n' +
        '<tr><td>IP记录</td><td id="ipAddress"></td></tr>\n' +
        '</tbody>\n' +
        '</table> \n' +
        '<div class="mt-30 mb-50">\n' +
        '<div class="f-16 bold">Acceptlist</div>\n' +
        '<table class="Table_common mt-15">\n' +
        '<thead>\n' +
        '<tr>\n' +
        '<td>问题id</td>\n' +
        '<td>语言</td>\n' +
        '<td>提交时间</td>\n' +
        '<td>结果</td>\n' +
        '</tr>\n' +
        '</thead>\n' +
        '<tbody id="AcceptList"></tbody>\n' +
        '</table> ' +
        '    <div class="paging-area-box mt-10 magin-auto">\n' +
        '        <div class="paging-area float-left" id="pagination"></div>\n' +
        '        <span class="pageNum float-right f-14">共<em>0</em>条数据</span>\n' +
        '    </div>'+
        '</div>\n' +
        '</div>';

    $(".info-tables").html(html);

    $(".infoUL li").eq(0).addClass("active").siblings("li").removeClass("active");
    $(".info-area .title").html("用户信息");

    $.ajax({
        url: search_user_interface,
        type:'post',
        dataType:'json',
        xhrFields:{
            withCredentials:true
        },
        crossDomain:true,
        data:{
            username:getUserName()
        },
        success: function(data) {
            if(data.code==200){
                $("#uname").html(data.data.username);
                $("#nickname_info").html(data.data.nickname);
                $("#emails").html(data.data.email);
                $("#telephone").html(data.data.telephone);
                $("#ipAddress").html(data.data.ipAddress);
                $(".ACRate em").html(data.data.ACRate);

                var tml = "";
                for (x in data.data.recentAccept) {
                    tml += "<div>"+
                        '<span class="c-79b float-left f-14">'+recentAccept[x]["userSubmitId"]+'</span>' +
                        '<span class="float-right f-14">'+recentAccept[x]["result"]+'</span>' +
                        "</div>" ;
                }
                $(".infoListBox").html(tml);
                usersubmitListFun()
            }else{
                $.message(data.msg);
            }
        },
        error: function () {
            $.message("链接超时，请刷新...");
        }
    });
}

function usersubmitListFun() {
    var id = window.document.getElementById("AcceptList");

    $.ajax({
        url: get_usersubmit_interface,
        type: 'post',
        dataType: 'json',
        xhrFields: {
            withCredentials: true
        },
        crossDomain: true,
        success: function (data) {
            if (data.code == 200) {
                inner_usersubmitTbody(data, id);
            } else {
                $.message(data.msg);
            }
        },
        error: function (error) {
            parent.popMessage("链接超时，请刷新...");
        }
    });
}

function inner_usersubmitTbody(data, id) {
    var page = data.data.submitList.length;
    var tml = "";
    $(".pageNum em").html(page);
    if (page > 0) {
        var lists = data.data.submitList;
        for (x in lists) {
            tml += "<tr>" +
                '<td>' + lists[x]["questionId"] + '</td>' +
                '<td>' + lists[x]["language"] + '</td>' +
                "<td>" + lists[x]["createTime"] + "</td>" +
                "<td>" + lists[x]["codeStatus"] + "</td>" +
                "</tr>";
        }
        id.innerHTML = tml;
    } else {
        id.innerHTML = "没有数据";
    }
}